Makes this thing a roamer of its world: free to move anywhere inside the rectangle from (min_x, min_y) to (max_x, max_y), in places of the world. The game keeps it inside. When the part of the world it is in is left behind it waits where it was, with every value it had, and when a part that holds its place is loaded again it comes back there. Call it again to move the rectangle. roam_stop() makes it an ordinary thing again.
roam_boundary(min_x, min_y, max_x, max_y)| Name | Type |
|---|---|
min_x | real |
min_y | real |
max_x | real |
max_y | real |
Nothing.
Makes this thing a roamer of its world. A roamer is free to move anywhere inside the rectangle from (min_x, min_y) to (max_x, max_y), which are places in the world (whole pixels, counted from the world's top-left corner), and the game keeps it inside: if your code moves it outside, it is put back on the edge.
A roamer is the way to have something that lives in the world, rather than in the one part of the world where you placed it: a wolf that hunts the whole forest, a merchant who walks the road.
roam_boundary again to move the rectangle.The game keeps room for 32 roamers in all. A call past that does nothing, and the debug overlay counts how many were refused. A roamer takes its own place in its object's Max instances, so give an object that roams room for every roamer it has, as well as for the copies in view. Roamers are not saved with the game. The call does nothing outside a world.
roam_stop makes the thing an ordinary instance again.
roam_boundary(400, 100, 900, 300);In a wolf's Create event: the wolf roams the box from 400, 100 to 900, 300 of the world.
The game keeps room for 32 roamers in all; a call past that does nothing and is counted in the debug overlay. The thing is set aside in its own place in its object's list, so that object needs room for every roamer it has as well as the ones in view. While no loaded part holds a roamer it is not run, drawn or counted, and it cannot be found by other code. Roamers are not saved with the game. Positions are whole pixels. Does nothing outside a world.